from .trace import TraceConnection, TRACE_SETTINGS
from datetime import datetime, timedelta


def export_trace_data(start_time, end_time):
    trace_conn = TraceConnection(TRACE_SETTINGS)

    # end_time = datetime.now()
    # start_time = end_time - timedelta(minutes=1)

    data = trace_conn.trace_extract(start_time, end_time)
    data.to_csv("/TraceAnomaly/data/trace.csv", index=False)
    # 第 73 行报错
